package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);


    List<Employee> queryForList(EmployeeQueryObject qo);

    int selectCount(EmployeeQueryObject qo);

    Employee selectByUsername(String username);

    void updateStateById(Long id);

    void updatePasswordById(@Param("id") Long id,@Param("newPassword") String newPassword);

    void insertRoleRelation(@Param("empId") Long empId,@Param("roleId") Long roleId);

    void deleteRoleRelation(Long id);

    List<Employee> selectExportData(EmployeeQueryObject qo);
}